package com.eastfair.imaster.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.core.base.entity.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 嘉宾列表
 * </p>
 *
 * @author zjn
 * @since 2021-11-10
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("o_speaker_list")
@ApiModel(value = "SpeakerList", description = "嘉宾列表")
@AllArgsConstructor
public class SpeakerList extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 列表名称
     */
    @ApiModelProperty(value = "列表名称")
    @Size(max = 256, message = "列表名称长度不能超过256")
    @TableField(value = "name", condition = LIKE)
    @Excel(name = "列表名称")
    private String name;

    /**
     * 编码
     */
    @ApiModelProperty(value = "编码")
    @Size(max = 256, message = "编码长度不能超过256")
    @TableField(value = "code", condition = LIKE)
    @Excel(name = "编码")
    private String code;

    /**
     * 列表说明
     */
    @ApiModelProperty(value = "列表说明")
    @Size(max = 256, message = "列表说明长度不能超过256")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "列表说明")
    private String remark;

    /**
     * 排序方式
     */
    @ApiModelProperty(value = "排序方式")
    @Size(max = 32, message = "排序方式长度不能超过32")
    @TableField(value = "sort_order_type", condition = LIKE)
    @Excel(name = "排序方式")
    private String sortOrderType;

    /**
     * 是否启用：1是；0否
     */
    @ApiModelProperty(value = "是否启用：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;


    @Builder
    public SpeakerList(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Long projectId, String name, String code, String remark, String sortOrderType, 
                    Integer isEnabled, Integer isDeleted) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.projectId = projectId;
        this.name = name;
        this.code = code;
        this.remark = remark;
        this.sortOrderType = sortOrderType;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
    }

}
